<!DOCTYPE html>
<html>
  <head>
    <title>{{ app_name }}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
    <script src="/ppcom/assets/pp-library.min.js" type="text/javascript"></script>
  </head>

  <body onload="setHeight();" onresize="setHeight();">

    <!-- <div class="full" style="background: url('/ppcom/assets/img/ppcom-demo-layout.svg') no-repeat center; background-size:cover; width:100%; height:100%;"> -->
    <!-- </div> -->
    <div id="full">
      <img src='/ppcom/assets/img/ppcom-demo-layout.svg' style="witdh:100%; height:100%;"> </img>
    </div>

    <script>
      function setHeight()
      {
      var height = document.documentElement.clientHeight;
      var width = document.documentElement.clientWidth;
      var full = document.getElementById('full');
      full.style.width = width+"px";
      full.style.height = height+"px";                                      
      }
    </script>

    <script>
      function showPPCom() {
      if (PP) {
      PP.show();
      }
      }
      
      function closePPCom() {
      if (PP) {
      PP.hide();
      }
      }
    </script>
    
    <script>
      window.ppSettings = {
      app_uuid: "{{ app_uuid }}" ,
      language: "zh-CN",
      view: {
      launcherContainerBottomMargin: "200px",
      launcherContainerRightMargin: "20px",
      autoShow: true,
      showLauncherContainer: false,
      }
      };
      PP.boot( window.ppSettings, function( success, errorCode ) {
      
      if ( !success ) {
      switch ( errorCode ) {
      case 10002:
      alert( '您的浏览器版本太低，请您更换为更高版本的浏览器进行预览' );
      break;
      }
      }
      
      } );
    </script>
    
  </body>
  
</html>
